//
//  graphics.hpp
//  RPG
//
//  Created by Matt Bailey on 29/12/2013.
//  Copyright (c) 2013 Matt Bailey. All rights reserved.
//

#pragma once

#include "game.hpp"
#include "shader.hpp"

#include <iostream>
#include <fstream>
#include <vector>
#include <string>

#include "lodepng.hpp"

using namespace std;

class Graphics {
    
    static string settings;
    static void parseConfig();
    
    public:
    
        static string &setSettings() { return settings; }
    
        static void init();
    
        static void initGLFW();
        static void initGLEW();

        static GLuint vertexArrayID;
    
        static Shader shader;
        static GLuint loadPNG(string fileName);
    
        static GLuint createVAO();
        static GLuint createVBO(const vector<glm::vec2> vertexData);

        static void render(GLuint vertexBuffer, GLenum mode, unsigned int size, unsigned int location);
};